package controller.admin.main;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import core.base.controller.BaseSpringController;

@Controller("admin.mainController")
public class MainController extends BaseSpringController {

	private String indexView = "admin/main/index";
	private String logoView = "admin/main/logo";
	private String tabView = "admin/main/tab";
	private String menuView = "admin/main/menu";
	private String statusView = "admin/main/status";

	@RequestMapping("/admin/main/index.htm")
	public ModelAndView index(HttpServletRequest request, HttpServletResponse response, Long userid) {
		Map modelMap = new HashMap();
		modelMap.put("sitename", "管理系统");
		return new ModelAndView(indexView).addAllObjects(modelMap);
	}

	@RequestMapping("/admin/main/logo.htm")
	public ModelAndView logo(HttpServletRequest request, HttpServletResponse response, Long userid) {

		return new ModelAndView(logoView);
	}

	@RequestMapping("/admin/main/tab.htm")
	public ModelAndView tab(HttpServletRequest request, HttpServletResponse response, Long userid) {

		return new ModelAndView(tabView);
	}

	@RequestMapping("/admin/main/menu.htm")
	public ModelAndView menu(HttpServletRequest request, HttpServletResponse response, Long userid) {

		return new ModelAndView(menuView);
	}

	@RequestMapping("/admin/main/status.htm")
	public ModelAndView status(HttpServletRequest request, HttpServletResponse response, Long userid) {

		return new ModelAndView(statusView);
	}
}
